package tank.draw;

import javax.swing.*;
import java.awt.*;

/**
 * @Author: WaveKing
 * @Description: TODO
 * @Date: Created in 19:22 2023/11/9
 * @Modified By:
 */
public class draw extends JFrame {
    private mypanel p  =  null;
    public static void main(String[] args) {
        new draw();
    }
    public draw() {
        //初始化面板
        p = new mypanel();
        this.add(p);
        this.setSize(500,600);
        this.setVisible(true);

    }
}

//定义一个画板
class myPanel1 extends JPanel{
    @Override
    public void paint(Graphics g) {
        //g可以理解为画笔
        super.paint(g);
        g.drawArc(10,20,100,200,54,50);
    }
}
